package com.wmyg.antifake.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

/**
 * @author 王卓逸
 * @program TODO
 * @description TODO
 * @create 2019-05-05
 */
@Entity
@EntityListeners(AuditingEntityListener.class)
@Data
@Table(name = "bk_company")
@ApiModel
public class Company {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "company_id")
    @ApiModelProperty(value = "企业Id", example = "1")
    private Integer companyId;

    @Column(name = "company_name")
    @ApiModelProperty(value = "企业名称", example = "测试企业1")
    private String companyName;

    @Column(name = "address")
    @ApiModelProperty(value = "通信地址", example = "北京某地")
    private String address;

    @Column(name = "contract")
    @ApiModelProperty(value = "联系人", example = "某某某")
    private String contract;

    @Column(name = "contract_num")
    @ApiModelProperty(value = "联系电话", example = "13888888888")
    private String contractNum;

    @Column(name = "licence_num")
    @ApiModelProperty(value = "统一社会信用代码或身份证号", example = "230100000000000000")
    private String licenceNum;

    @Lob
    @Column(name = "licence_pic")
    @ApiModelProperty(value = "营业执照照片或身份证照片", example = "https://***.jpg&123&123,https://***")
    private String licencePic;

    @Column(name = "company_logo")
    @ApiModelProperty(value = "企业logo", example = "https://***.jpg&123&123")
    private String companyLogo;

    @Lob
    @Column(name = "company_pics")
    @ApiModelProperty(value = "企业图片（多张）", example = "https://***.jpg&123&123,https://***")
    private String companyPics;

    @Column(name = "type")
    @ApiModelProperty(value = "企业类型", example = "1")
    private Integer type;

    @CreatedDate
    @Column(name = "create_time")
    private Date createTime;

    @LastModifiedDate
    @Column(name = "modify_time")
    private Date modifyTime;

}
